package io.renren.modules.department.mapper;


import io.renren.modules.department.model.DepartmentEntity;
import io.renren.modules.department.model.DepartmentVo;
import io.renren.modules.sys.entity.SysMenuEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author chenshun
 * @email sunlightcs@gmail.com
 * @date 2020-11-18 15:23:46
 */
@Mapper
public interface DepartmentMapper {

    List<DepartmentVo> getNodeTree();

    List<DepartmentVo> getAllList();

    DepartmentEntity getDepartmentById(@Param("id") Integer id);

    DepartmentEntity checkDepartmentName(@Param("departmentName") String departmentName);

    Integer save(DepartmentEntity departmentEntity);

    Integer updateById(DepartmentEntity departmentEntity);

    Integer removeByIds(@Param("ids") List<Integer> ids);
    /**
     * 根据父，查询子
     * @param parentId
     */
    List<DepartmentEntity> queryListParentId(@Param("parentId") Long parentId);
}
